As a data volume of stream data that needs to be processed in a stream processing task becomes increasingly larger, a single computing node has become incapable of processing all stream data in the stream processing task. Therefore, the stream data in the stream processing task is placed separately on multiple computing nodes, and the multiple computing nodes process the stream data separately. With the development of a multi-core technology, in order to use resources of a computing node more effectively to perform efficient processing on the stream data, stream processing units capable of parallel processing are used to perform parallel processing on the stream data. Specifically, the stream processing units are allocated to each computing node, and a stream processing component on the computing node manages at least one allocated stream processing unit, thereby implementing processing on the stream data. Therefore, a proper method for allocating a stream processing unit is crucial to implementing efficient processing on the stream data.
At present, when a stream processing unit is allocated, the number of stream processing components and the number of stream processing units included in each stream processing component are determined in a stream processing task. A stream system service module allocates a stream processing unit to a stream system processing module according to a volume size of stream data flowing into the stream processing unit. For example, a stream processing task has three stream processing units, which are respectively a stream processing unit 1, a stream processing unit 2, and a stream processing unit 3, where a volume of stream data flowing into both the stream processing unit 1 and the stream processing unit 2 is 1 GB, and a volume of data in the stream processing unit 3 is 2 GB. The stream processing unit 1 and the stream processing unit 2 are allocated to a stream system processing module 1 on a computing node 1, and the stream processing unit 3 is allocated to a stream system processing module 2 on a computing node 2 according to the volume sizes of the data flowing into the stream processing units.
During research on the prior art, the inventor finds that the existing method for allocating a stream processing unit has at least the following problems:
A stream processing unit is allocated to a stream system processing module according to a volume size of stream data flowing into the stream processing unit, but a processing capability of a computing node on which the stream processing unit is located is not considered; therefore, a case is caused in which computing resourced of the computing node on which the stream processing unit is located cannot satisfy a requirement for processing a data stream allocated by the stream system service module to the stream processing unit, thereby reducing the data stream processing efficiency for a distributed stream processing system.